Skip to content

Fix remote paths with tilde (~) for shell expansion#16

Merged
nitrobass24 merged 4 commits intomasterfrom
develop
Jan 27, 2026
Merged

Fix remote paths with tilde (~) for shell expansion#16
nitrobass24 merged 4 commits intomasterfrom
develop

Conversation

@nitrobass24
Copy link
Owner

@nitrobass24 nitrobass24 commented Jan 27, 2026

Summary

  • Fixed remote scanner to properly handle paths containing ~ by converting to $HOME for shell expansion
  • Fixed LftpJobStatusParser crash on empty jobs -v output
  • Added unit tests for both fixes
  • Bumped version to 0.10.4

Fixes #14
Fixes #15

Test plan

  • Unit tests pass (all remote_scanner and job_status_parser tests)
  • Docker container tested locally with ~/downloads/cross-seed path
  • App connects to seedbox and scans files without crashing

nitrogit24 and others added 4 commits January 27, 2026 09:47
The remote scanner now properly handles paths containing `~` by converting
them to `$HOME` for shell expansion. This allows users whose SSH and LFTP
paths differ (e.g., LFTP locked to home directory) to use tilde paths.

Changes:
- Added `_escape_remote_path_single()` for literal paths (single quotes)
- Added `_escape_remote_path_double()` for tilde paths (double quotes + $HOME)
- Scan command uses consistent quoting based on whether path has tilde
- Added unit test for tilde path handling

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The parser now gracefully handles empty or unexpected output from lftp
`jobs -v` command instead of crashing with "Missing queue header line 1".

Changes:
- __parse_queue now returns empty list instead of raising on missing/invalid headers
- Added tests for empty jobs command output scenarios

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Builds and pushes Docker image tagged 'develop' to ghcr.io on every
push to the develop branch.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Fix parser failing with "First line is not a matching header" when
LFTP output contains terminal control sequences like bracketed paste
mode (^[[?2004l, ^[[?2004h). These ANSI escape codes are now stripped
before parsing.

Fixes #15

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@nitrobass24 nitrobass24 merged commit 7260932 into master Jan 27, 2026
6 checks passed
@nitrobass24 nitrobass24 deleted the develop branch January 27, 2026 21:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

v0.10.3: LftpJobStateParser error: Missing queue header line 1 v0.10.3: Change in remote scanner code

2 participants